package com.base.web;

import org.springframework.web.servlet.ModelAndView;

import com.base.util.WebUtils;

public class JModelAndView extends ModelAndView {
	public JModelAndView(String viewName) {
		super.setViewName(viewName);
		super.addObject("session", WebUtils.getHttpSession());
	}

	
	public JModelAndView(String viewName, int type) {
		if (type == 0) {
			super.setViewName("/WEB-INF/templates/zh_cn/system/" + viewName);
		}
		if (type == 1) {
			super.setViewName("/WEB-INF/templates/zh_cn/view/" + viewName);
		}
		if (type > 1) {
			super.setViewName(viewName);
		}
	}
}
